﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Rose Paradise</title>

		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/ext-all.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/portal.css" />


		<script type="text/javascript" src="<%=basePath%>js/ext/ext-base.js"></script>
		<script type="text/javascript"
			src="<%=basePath%>js/ext/ext-all-debug.js"></script>
		<script type="text/javascript" src="<%=basePath%>js/portal/Portal.js"></script>
		<script type="text/javascript"
			src="<%=basePath%>js/portal/PortalColumn.js"></script>
		<script type="text/javascript" src="<%=basePath%>js/portal/Portlet.js"></script>
		<script type="text/javascript" src="<%=basePath%>js/portal/loginform.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajax/engine.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajax/util.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajax/interface/LoginCheckAjax.js"></script>
		<script type="text/javascript" src="<%=basePath%>/js/locale/ext-lang-zh_CN.js"></script>
		<style type="text/css">
			#west-panel {
				display: none;
			}
			
			#bottombox {
				display: none;
			}
		</style>
		<script type="text/javascript">
  		
  		function goAlbumManage(){
  			document.forms.mainForm.action="<%=basePath%>action/PhotoManage.htm?cmd=managealbum";
            document.forms.mainForm.isstudio.value="Y";
            document.forms.mainForm.submit();
  		}
			Ext.onReady(function(){
			    // NOTE: This is an example showing simple state management. During development,
			    // it is generally best to disable state management as dynamically-generated ids
			    // can change across page loads, leading to unpredictable results.  The developer
			    // should ensure that stable state ids are set for stateful components in real apps.
			   Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
			   
			   Ext.QuickTips.init();
			   Ext.form.Field.prototype.msgTarget = 'side';
				
			    // create some portlet tools using built in Ext tool ids
			    var closetool = {
			        id:'close',
			        handler: function(e, target, panel){
			            panel.ownerCt.remove(panel, true);
			        }
			    };
			    
			 	var geartool = {
			        id:'gear',
			        handler: function(){
			            Ext.Msg.alert('Message', 'The Settings tool was clicked.');
			        }
			    };
			    var albumtool = {
			        id:'gear',
			        handler: function(){
				        LoginCheckAjax.checkManageRights({callback:function(dataFromServer){							
							if("true"==dataFromServer){
								goAlbumManage();								
							}else if("false"==dataFromServer){
								Ext.Msg.alert(Rose.Locale.Login.rightsFailureTitleText,Rose.Locale.Login.rightsFailureText);
							}else{
								showLoginForm('<%=basePath%>action/Login.htm',goAlbumManage);
							}
						} 
					}); 
			            
			        }
			    };
			    var viewport = new Ext.Viewport({
			        layout:'border',
			        items:[{
			            xtype:'portal',
			            id:'portalX',
			            region:'center',
			            autoScroll:true,
			            
			            margins:'99 -2 -2 0',
			            items:[{
			              
			                columnWidth:.33,
			                style:'padding:10px 0 10px 10px',
			                items:[{
			                  style:'opacity:0.8',
			                    title: 'Member Introduction 1',
			                    id:'portalcol1',
			                    tools: [geartool,closetool],
			                    draggable:false,
			                    
			                    html: Ext.example.shortBogusMarkup
			                },{
			                  style:'opacity:0.8',
			                    title: 'Member Introduction 2',
			                    tools: [closetool],
			                    draggable:false,
			                    html: Ext.example.shortBogusMarkup
			                },{
			                    title: 'Member Introduction 3',
			                    style:'opacity:0.8',
			                    tools: [closetool],
			                    draggable:[closetool],
			                    html: Ext.example.shortBogusMarkup
			                }]
			            },{
			                columnWidth:.33,
			                style:'padding:10px 0 10px 15px',
			                items:[{
			                    title: 'Designs',                  
			                    layout:'fit',
			                    draggable:false,
			                    tools: [albumtool],
			                    items: {}
			                },{
			                  style:'opacity:0.8',
			                    title: 'Q & A',
			                    id:"styleTest",
			                    tools: [geartool],
			                    html: Ext.example.shortBogusMarkup
			                },{
			                  style:'opacity:0.8;height:600',
			                    title: 'Blog',
			                    tools: [geartool],
			                    html: Ext.example.shortBogusMarkup
			                }]
			            },{
			                columnWidth:.32,
			                style:'padding:10px 0 10px 15px',
			                items:[{
			                  style:'opacity:0.8',
			                    title: 'Notice',
			                    tools: [geartool],
			                    html: Ext.example.shortBogusMarkup
			                },{
			                  style:'opacity:0.8',
			                    title: 'AD',
			                    tools: [closetool],
			                    html: Ext.example.shortBogusMarkup
			                },{
			                  style:'opacity:0.8',
			                    title: 'Another AD',
			                    tools: [closetool],
			                    html: Ext.example.shortBogusMarkup
			                }]
			            }]
			            
			           
			        }]
			    });
			   // var test=Ext.get("styleTest")
			   //test.addListener("drag",function(){this.setStyle('opacity',0.8);});
			     var portalWrap = Ext.getBody().child(".x-portal div.x-column-layout-ct",false).setStyle("overflow-x","hidden");
			     //portalcol1.setStyle("scrollbar-highlight-color","#FAFAFA");
			     portalWrap.child("div.x-column-inner",false).setStyle("width","1416"); 
			    //
			   //var classN = portalcol1.child("div",1,false); 
			   //alert(classN.className); 
			   //alert(classN);
			});

 		</script>

	</head>
	<body>
		<script type="text/javascript" src="<%=basePath%>js/examples.js"> 
		</script>
		<div style="float:right">
			<a href="<%=basePath%>action/Login.htm?cmd=logout" ><script type="text/javascript">document.write(Rose.Locale.Login.logoutText);</script></a>
		</div>
		<form name="mainForm" method="POST">
			<input type="hidden" name="isstudio" value="" />
			<input type="hidden" name="memberid" value="" />
		</form>
	</body>
</html>